package com.example.iitematicviewer.api.machine;

import com.alibaba.fastjson.JSONObject;
import com.example.iitematicviewer.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class MachineAsyncMsgService {

    @Autowired
    private MachineService service;

    /**
     * 查询单个
     * @param param
     * @param resultVO
     * @return
     */
    @Async
    public ResultVO selectOne(JSONObject param, ResultVO resultVO){
        return service.selectOne(param,resultVO);
    }

    /**
     * 查询所有
     */
    @Async
    public ResultVO selectAll(ResultVO resultVO){
        return service.selectAll(resultVO);
    }

    /**
     * 新增
     * @param param
     * @param resultVO
     * @return
     */
    @Async
    public ResultVO insert(JSONObject param,ResultVO resultVO){
        return service.insert(param,resultVO);
    }

    /**
     * 删除
     * @param param
     * @param resultVO
     * @return
     */
    @Async
    public ResultVO delete(JSONObject param,ResultVO resultVO){
        return service.delete(param,resultVO);
    }

    /**
     * 修改
     * @param param
     * @param resultVO
     * @return
     */
    @Async
    public ResultVO update(JSONObject param,ResultVO resultVO){
        return service.update(param,resultVO);
    }
}
